home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2529 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  4.0 KB

  1. Path: sundog.tiac.net!usenet
  2. From: Darius Taghavy <dart@ycrdi.com>
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Multiplatform Development
  5. Date: 1 Feb 1996 16:55:26 GMT
  6. Organization: Young Chang R&D Institute
  7. Message-ID: <4eqr9u$s25@sundog.tiac.net>
  8. NNTP-Posting-Host: gatekeep.ycrdi.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1N (Macintosh; I; PPC)
  13. X-URL: news:comp.sys.amiga.programmer/81563-81662
  14.  
  15. Does anyone have experience with multiplatform application development?
  16. I currently have a large Amiga app (not yet released) that I am 
  17. considering to port to one or more of Mac/Be/NT/OS2.
  18.  
  19. I will keep developing on and for the Amiga, but real life economics
  20. require me to consider some of these other platforms.
  21.  
  22. Main questions:
  23.  
  24. a) Graphics
  25.    what is the graphics API like in these other systems?
  26.    I.e. On the Amiga we use Move(), Draw(),RectFill(),Text() etc.
  27.    all of which use a struct RastPort * as first argument.
  28.    I have already abstracted this layer. For example, I have
  29.    a text display routine that gets (rastport pointer, x,y, text 
  30.    pointer) arguments.
  31.    Do these other API's also use a single handle, such as RastPort?
  32.  
  33.         Mac: ?
  34.         NT:  ?
  35.         OS2: ?
  36.         Be:  ?
  37.  
  38. b) Event Handling
  39.    I love the event driven way the Amiga works. I heard the Mac
  40.    more or less polls. Is this true? How about other OSes?
  41.    Simplified pseudo code fragments to illustrate points would
  42.    be great! I start:
  43.  
  44.    Amiga:
  45.              Wait(on one or more signals) /* no CPU cycles wasted */
  46.  
  47.              switch on wakeup signal /* shared window port,
  48.                                         ARexx, timer interrupt etc */
  49.  
  50.              if (window port signal bit)
  51.                 {
  52.                 While (msg=GetMsg())
  53.                    {
  54.                    copy msg fields of interest
  55.  
  56.                    Reply(Msg)
  57.  
  58.                    dispatch window event handlers based on
  59.                    imsg->IDCMPWindow                  
  60.                    }
  61.               if (other signal bits)
  62.                  {
  63.                  ...
  64.                  }
  65.  
  66.         Mac: ?
  67.         NT:  ?
  68.         OS2: ?
  69.         Be:  ?
  70.  
  71. c) Interrupts/Timers
  72.    My app uses multiple tasks and interrupts. For a non-multi-tasking
  73.    OS I could still work, as I can conditionally compile into a
  74.    single task/multiple interrupt model already.
  75.    Basically, what I need is:
  76.     - *hardware* timer interrupt
  77.     - serial interrupt when receive buffer is full  
  78.     - serial interrupt when transmit buffer is full
  79.  
  80. d) CPU/Memory Architecture
  81.    I love architectures that are based on a linear address
  82.    space using the 68K family. I use a lot of pointers and
  83.    have no intention to ever code for a 16 bit OS.
  84.    I have heard horror stories about Intel processors and
  85.    have been fortunate to never having had to code for one.
  86.    Does NT abstract this somehow? Can you just declare
  87.    long *whatever; and then reference is the same way as on
  88.    the ami? Or do you have to deal with memory banks etc and
  89.    contruct a pointer from that. If I had to call a function
  90.    for every pointer I need it would be too slow and I wouldn't
  91.    even consider such a rediclious environment.
  92.  
  93. e) Source Code Database
  94.    How do you actually compile for the different targets?
  95.    Since there are no multiplatform compilers on the Amiga
  96.    such as the ones I looked at on Windows/OS2/Mac, how do
  97.    you maintain a single code base? (I do not like "cut and
  98.    paste" development).
  99.  
  100.    What comes to mind is to network the Amiga with the other
  101.    machine(s), then run the compiler on the other machine,
  102.    accessing the files stored on an Amiga filesystem and store
  103.    the object code in separate subdirs (one for each target).
  104.  
  105. There are other issues. I just typed up the ones that came to
  106. mind immediately. But this should be enough to get a discussion
  107. started. A public discussion for the benefit of everyone would be
  108. great, but if you like to help and stay anonymous for whatever
  109. reason, I would appreciate private e-mail, even if it's just a
  110. short hint or two.
  111.  
  112.  
  113.